<div class="page-header nav">
  <%= link_to new_device_path, class: 'btn btn-default navbar-btn pull-right' do %>
    + <%= t('.new') %>
  <% end %>
  <h3 class='navbar-text'>
    <%= link_to extface.root_path do %>
      Extface<sup>&hearts;</sup>
    <% end %>
    &raquo;
    <%= t('.devices') %>
  </h3>
</div>
<br />
<table class="table table-condensed table-stripped">
  <thead>
    <tr class='active'>
      <th><%= t('.name') %></th>
      <th><%= t('.parent') %></th>
      <th><%= t('.driver') %></th>
      <th>&nbsp;</th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <% @devices.each do |device| %>
      <tr>
        <td><%= link_to device.name, device %></td>
        <td><%= device.extfaceable.composite_id %></td>
        <td><%= device.driver ? device.driver.class::NAME : 'N/A' %></td>
        <td class='text-right'><%= link_to 'Edit', edit_device_path(device), class: 'btn btn-primary btn-sm' %></td>
        <td class='text-right'><%= button_to 'Delete', device, method: :delete, class: 'btn btn-danger btn-sm', data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

